//
//  JSMLeavingListModel.m
//  TakeYouTourTogether
//
//  Created by dllo on 15/11/30.
//  Copyright © 2015年 king. All rights reserved.
//

#import "JSMLeavingListModel.h"
#import "JSMLeavingMainAndHotModel.h"
@implementation JSMLeavingListModel

- (id)initWithCoder:(NSCoder *)aDecoder {
    self = [super init];
    if (self) {
        self.dataArr = [aDecoder decodeObjectForKey:@"dataArr"];
        self.desc = [aDecoder decodeObjectForKey:@"desc"];
        self.type = [aDecoder decodeIntegerForKey:@"type"];
    }
    return self;
}

- (void)encodeWithCoder:(NSCoder *)aCoder {
    [aCoder encodeObject:self.dataArr forKey:@"dataArr"];
    [aCoder encodeObject:self.desc forKey:@"desc"];
    [aCoder encodeInteger:self.type forKey:@"type"];
}

- (void)setValue:(id)value forUndefinedKey:(NSString *)key {
    if ([key isEqualToString:@"data"]) {
        self.dataArr = [NSMutableArray array];
        self.dataArr = [JSMLeavingMainAndHotModel baseModelByArr:value];
    }
}

@end
